package com.wzw.springboot.principle.use.security.infrastructure.config;

import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.concurrent.TimeUnit;

/**
 * @author Wangzhiwen
 */
@Data
@Accessors(chain = true)
@Component
@ConfigurationProperties(prefix = "token")
public class TokenProperties implements Serializable {

    /**
     * header名称
     */
    private String header;

    /**
     * 签名密钥
     */
    private String secret;

    /**
     * 过期时间
     */
    private Integer expires;

    /**
     * 过期时间单位
     */
    private TimeUnit unit;

    /**
     * 是否单人登录
     */
    private Boolean isSingle;
}
